<?php
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this \yii\web\View */
/* @var $content string */

$this->title = 'XYiiCms后台登录';

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
    <link rel="stylesheet" href="<?= Yii::getAlias('assets') ?>/static/css/login.css"/>
</head>
<body>
<?php $this->beginBody() ?>
<div class="row">
    <div class="col-md-5 col-md-offset-4 login-body">

        <h3><img src="<?= Yii::getAlias('assets') ?>/static/imgs/logo.jpg" alt=""/></h3>

        <?php $form = ActiveForm::begin([
            'method' => 'post',
            'options' => [
                'class' => 'form-body'
            ]
        ]);?>

        <?= $form->field($model, 'username')->textInput(['required' => 'required']) ?>

        <?= $form->field($model, 'password')->textInput(['type' => 'password', 'required' => 'required']) ?>

        <?= $form->field($model, 'rememberMe')->checkbox(); ?>

        <?= Html::submitButton('登录', ['class' => 'btn btn-primary']) ?>

        <?php $form->end();?>

    </div>
</div>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
